package com.github.ecbp.store.service.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.ecbp.common.data.service.BaseService;
import com.github.ecbp.store.service.dto.ProductDTO;
import com.github.ecbp.store.service.dto.ProductQueryDTO;
import com.github.ecbp.store.service.entity.Product;
import com.github.ecbp.store.service.vo.ProductPageVO;
import com.github.ecbp.store.service.vo.ProductVO;

import java.util.List;

/**
 * @Author Created by Alex·He on 2020/4/15 17:18
 * @Version 1.0
 * @Description 商品表(Product)表服务接口
 */
public interface ProductService extends BaseService<Product> {

    boolean save(ProductDTO param);

    boolean removeById(Long id);

    boolean removeByIds(List<Long> ids);

    boolean updateById(ProductDTO param);

    boolean updatePublishStatus(Long id, Integer publishStatus);

    boolean updateNewStatus(Long id, Integer newStatus);

    boolean updateRecommandStatus(Long id, Integer recommandStatus);

    boolean updatePreviewStatus(Long id, Integer previewStatus);

    ProductVO getById(Long id);

    IPage<ProductPageVO> page(ProductQueryDTO param);
}
